<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');

$_category = "warmath";
$_title = "Schedule / Signup for a Raid";
require('lib/head.php');

$system_id = $system["system_id"];

$raid_id = $_GET["id"];
$sql = "select * from wm_scheduled_raids left join wm_instances on wm_instances.instance_id = scheduled_raid_instance where wm_scheduled_raids.scheduled_raid_system_id = $system_id and scheduled_raid_id = $raid_id";

$result = $db->query($sql);
$raid = $db->fetch_assoc($result);

if($_GET["error"]!="") {
  boxRed("Error");
?>
    <?=$_GET["error"]?>
<?php
    boxBot();
    }

boxTop("Warmath: $_title");
?>
<b><?=$_title?></b><br />
for 
<a href="signup.php?id=<?=$raid["scheduled_raid_id"]?>"><?=$raid["instance_name"]?>, <?=date("D d M Y g:i a", strtotime($raid["scheduled_raid_datetime"]))?></a>
<br /><br />

<form action="do-signup-2.php" method="post">
<input type="hidden" value="<?=$system["system_id"]?>" name="system_id">
<input type="hidden" value="<?=$_GET["id"]?>" name="raid_id">
<i>Comments</i> (Optional)<br />
<i>Include any comments (e.g. if you can't make the start time or have to leave early)</i><br />
<textarea name="comments" rows=2 cols=80>
</textarea>
<br />
<input type="submit" value="Sign Up">
</form>
<?php
boxBot();
?>

<?php
require('lib/foot.php');
?>

